 <?php
class Home_Model extends CI_Model {
	
	 public function getAllHome()
	{
		$query = $this->db->get('home'); //  table name
		return $query->result_array();// get resultset and return 
	}
	 public function getHomeById($id)
	{	
		$conditions =  array('id' => $id);
		//$query = $this->db->get('home'); //  table name
		$query = $this->db->get_where('home',$conditions); //  table name and conditions 
		//return $query->row_array(); // a row
		 return $query->result_array();// get resultset and return 
	}
	
	public function create()
	{	
		echo "create new a item";
	//$conditions =  array('id' => $id);
		//$query = $this->db->get('home'); //  table name
		//$query = $this->db->get_where('home',$conditions); //  table name and conditions 
		//return $query->row_array(); // a row
		 //return $query->result_array();// get resultset and return 
	}
	
	
}